import service from '../utils/request'

export function fetchStaffList (params) {
  return service({
    url: '/employee',
    method: 'get',
    params
  })
}

export function fetchStaffByName (params) {
  return service({
    url: '/employee',
    method: 'get',
    params
  })
}

export function addStaff (data) {
  return service({
    url: '/employee',
    method: 'post',
    data
  })
}

export function editStaff (data) {
  return service({
    url: '/employee',
    method: 'put',
    data
  })
}

export function deleteStaff (params) {
  return service({
    url: '/employee',
    method: 'delete',
    params
  })
}
